<div class="primary">
    <div class="main-content">
        <div class="main-content-left">
            <div class="breadcrumb">
            	<span itemtype="http://data-vocabulary.org/Breadcrumb" itemscope="itemscope" class="crumb_item">
            		<a itemprop="url" rel="up" class="crumb" href="<?=DOMAIN?>/"><span itemprop="title">Trang chủ</span></a>
            		<span class="arrow"><img src="<?=$path_images_page?>navRow.png" alt="bredcrumb arrow"/></span>
            	</span>
            	<span itemtype="http://data-vocabulary.org/Breadcrumb" itemscope="itemscope" class="crumb_item">
            		<a itemprop="url" rel="up" class="crumb" href="<?=DOMAIN?>/<?=removeTitle($news['cat_name'])?>.htm"><span itemprop="title"><?=$news['cat_name']?></span></a>
            		<span class="arrow"><img src="<?=$path_images_page?>navRow.png" alt="bredcrumb arrow"/></span>
            	</span>
                <span itemtype="http://data-vocabulary.org/Breadcrumb" itemscope="itemscope" class="crumb_item">
            		<a itemprop="url" rel="up" class="crumb" href="<?=generate_detail_url($news,$news['cat_name'])?>"><span itemprop="title"><?=$news['new_title']?></span></a>
            	</span>
                <span class="breadcrumb_date"><?=getDateTime('','1','1','0','',time())?></span>
            </div>
            <div class="detail-box-news">
                <div itemscope itemtype="http://schema.org/Article" class="detail-box-news-detail">
                    <h1 itemprop="name" class="title"><?=$news['new_title']?></h1>
                    <p class="date"><?=getDateTime('','1','1','1','',$news['new_date'])?> - Nguồn <span itemprop="author"><?=$url_parse['host']?></span></p>
                    <?=($news['new_teaser'] !='')?"<h2 class='summary'><span itemprop='articleSection'>".$news['new_teaser']."</span></h2>":""?>
                    <div class="show-detail-box-news" itemprop="articleBody">
                        <?=$news['new_detail']?>
                    </div>
                    <div class="social_wrap">
		                <ul>
		                    <li><div class="fb-like" data-href="<?=DOMAIN.$_SERVER['REQUEST_URI']?>" data-width="450" data-layout="button_count" data-show-faces="false" data-send="false"></div></li>
		                    <li><div class="g-plusone" data-size="medium" data-annotation="inline" data-width="300" data-href="<?=DOMAIN.$_SERVER['REQUEST_URI']?>"></div></li>
		                </ul>
		                <script type="text/javascript" src="https://apis.google.com/js/plusone.js">
		                  {lang: 'vi'}
		                </script>
		                
		            </div>
                </div>
                <p style="font-size: 11px; font-style: italic; color: #888">Phiên bản cache tại địa chỉ: <?=$url_news?></p>
                <div itemprop="keywords" class="detail-box-news-tags labels">
                    <h3>Tags: </h3>
                    <?php
                    $arr_tags = explode(',',$news['new_tags']);
                    $count = count($arr_tags);
                    foreach($arr_tags as $key=>$tags) {
                        if($tags != '' && $key <= ($count -1)) {
                            if($key === ($count -2)){
                                $tag_links  = str_replace(' ','+',$tags);
                            ?>
                            <a class="label" href="<?=generate_tags_url($tag_links)?>" target="_self"><?=$tags?></a>
                            <?
                            }else{
                                $tag_links  = str_replace(' ','+',$tags);
                            ?>
                            <a class="label" href="<?=generate_tags_url($tag_links)?>" target="_self"><?=$tags?>,</a>
                            <?
                            }
                        }
                    }
                    ?>
                </div>
                <div id="comments" class="comments" itemprop="comment">
                    <p class="share_fb">CHIA SẺ</p>
                    <?/*
                    <div class="comments_tab">
                        <h3>Bình luận cho tin tức này</h3>
                        <a class="send_comments btn btn-small" href="javascript: void()" onclick="loadpopup_comments();">Bình luận</a>
                    </div>
                    <div class="comments_main">
                        <?php if($list_comments):?>
                        <ul>
                        <?php
                        foreach($list_comments as $comment) {
                            //Session like và dislike
                            if(isset($_SESSION[$_SERVER['REMOTE_ADDR'].$comment['com_id']])) {
                                $lsec = 1;
                            }else {
                                $lsec = 2;
                            }
                            ?>
                            <li data-like="<?=$lsec?>" data-remote="<?=$_SERVER['REMOTE_ADDR'].$comment['com_id']?>" data-id="<?=$comment['com_id']?>">
                                <h4><span><?=$comment['com_name']?>:</span> <?=$comment['com_title']?></h4>
                                <h5><?=$comment['com_content']?></h5>
                                <p>
                                    <span class="comments_dislike" onclick="comments_dislike(this);"><i class="icon-thumbs-down"></i> <?=$comment['com_dislike']?></span>
                                    <span class="comments_like" onclick="comments_like(this);"><i class="icon-thumbs-up"></i> <?=$comment['com_like']?></span>
                                    <span class="comments_time">Gửi lúc <?=date('H:i - d/m/Y',$comment['com_date'])?></span>
                                </p>
                            </li>
                            <?
                        }
                        ?>
                        </ul>
                        <?php
                        if(count($list_comments > 5)) {
                            ?>
                            <a class="next_comment" href="#comments" onclick="next_comment(this);" data-id="<?=$iNews?>" data-page="2">Trang sau</a>
                            <?
                        }
                        ?>
                        <?php else:?>
                            <p>Chưa có bình luận nào</p>
                        <?php endif;?>
                    </div>
                    */?>
                    <div class="fb-comments" data-href="vnupdate.net<?=$_SERVER['REQUEST_URI']?>" data-width="750" data-numposts="10" data-colorscheme="light"></div>
                </div>
                <?/*
                <div class="detail-box-news-interested">
                    <h3>Có thể bạn quan tâm</h3>
                    <ul>
                    <?php
                    foreach($list_hot as $news_hot) {
                        ?>
                        <li><a href="<?=generate_detail_url($news_hot,GetNamecat($news_hot['new_cat_id']))?>">
                            <div class="img">
                                <img src="<?=$news_hot['new_picture']?>" alt="<?=$news_hot['new_title']?>"/>
                            </div>
                            <h2><?=$news_hot['new_title']?></h2>
                        </a></li>
                        <?
                    }
                    ?>
                    </ul>
                </div>
                */?>
                <div class="ads" style="text-align: center;">
                    <?/*<script type="text/javascript">
                        var ro2zoneid = '235785';
                        var ro2width = '728';
                        var ro2height = '90';
                        var parentpos;
                        	if ( window.location === window.top.location ) 
                        		{ parentpos=window.location + "#(referrer)[" + document.referrer + "]"; } 
                        		else { parentpos=window.location + "#(parent_location)[" + document.referrer + "]"; }
                        document.write('<iframe src="http://ro2.biz/ad.php?zone='+ro2zoneid+'&w='+ro2width+'&h='+ro2height+'&rf='+encodeURIComponent(parentpos)+'"');
                        document.write(' name="ro2bizadtag" title="ro2bizadtag" scrolling="no"');
                        document.write('border="0" frameborder="0" width="728" height="90"></iframe>');
                        document.write('<nosc'+'ript><a href="http://ro2.biz" title="Ro2.biz">Ro2.biz</a></noscr'+'ipt>');
                    </script>
                    */?>
                </div>
            </div><!-- End detail-box-news -->
            <!-- End detail-box-sub -->
        </div><!-- End main-content-left -->
        <div class="main-content-right">
            <div class="fix_scroll">
                <?/*
                <div class="detail-box-sub">
                    <div class="detail-box-sub-relate">
                        <h3>Tin liên quan</h3>
                        <ul>
                        <?php
                        $relate = news_relate($news,3);
                        for($i = 0; $i < 10; $i++) {
                            if(isset($relate[$i])) {
                                ?>
                                <li><a href="<?=generate_detail_url($relate[$i],GetNamecat($relate[$i]['new_cat_id']));?>">
                                    <span>
                                        <img alt="<?=$relate[$i]['new_title']?>" src="<?=$relate[$i]['new_picture']?>" />
                                    </span>
                                    <h2><?=$relate[$i]['new_title']?></h2>
                                </a></li>
                                <?
                            }
                        }
                        ?>
                        </ul>
                    </div>
                </div>
                */?>
                <div class="detail-box-sub-relate">
                    <h3>Tin đọc nhiều nhất</h3>
                    <ul>
                    <?php
                    foreach($list_view as $news_view) {
                        ?>
                        <li><a href="<?=generate_detail_url($news_view,$news['cat_name'])?>">
                            <span>
                                <img src="<?=show_medium_url($news_view['new_picture'],'_t')?>" alt="<?=$news_view['new_title']?>"/>
                            </span>
                            <h2><?=$news_view['new_title']?></h2>
                        </a></li>
                        <?
                    }
                    ?>
                    </ul>
                </div>
                <div class="detail-box-sub-relate">
                    <h3>Tin mới cập nhật</h3>
                    <ul>
                    <?php
                    foreach($list_new as $news_new) {
                        ?>
                        <li><a href="<?=generate_detail_url($news_new,GetNamecat($news_new['new_cat_id']))?>">
                            <span>
                                <img src="<?=show_medium_url($news_new['new_picture'],'_t')?>" alt="<?=$news_new['new_title']?>"/>
                            </span>
                            <h2><?=$news_new['new_title']?></h2>
                        </a></li>
                        <?
                    }
                    ?>
                    </ul>
                </div>
            </div>
        </div><!-- End main-content-right -->
    </div><!-- End main-content -->
</div><!-- End primary -->
<div class="fb-recommendations-bar" data-site="vnupdate.net" data-read-time="30" data-side="right" data-action="recommend" style="z-index: 10001;"></div>
<script>
$(document).ready(function () { 
    var positionFooter = $('.footer').offset().top;
    $(window).scroll(function(){
        var scrollPos = $(window).scrollTop();
        if ( scrollPos > 95){
            var c = $( window ).height() - 40;
            $('.fix_menu_active').css({'height':'35px','width':'1010px','margin': '0 auto'})
            $('.fix_menu').css({'position':'fixed','width':'100%','height':'35px','left':'0px','top':'0px'});
            $('.navigation').css({'position':'fixed','margin':'0 auto','left':'50%','margin-left':'-505px','top':'0px'});
            $('.fix_scroll').css({'position':'fixed','margin-left':'240','top':'40px','height':c+'px','z-index':'10000'});
            if(scrollPos >= positionFooter - $(window).height()+160){
                $('.fix_scroll').css('height',c - 125);
            }else{
                $('.fix_scroll').css('height',c);
            }
        }else{
            $('.fix_menu_active').removeAttr('style');
            $('.fix_menu').removeAttr('style');
            $('.navigation').removeAttr('style');
            $('.fix_scroll').removeAttr('style');
        }
    });  
});
</script>